<template>
    <!--查询结果的列表-->
    <el-table :data="state.dataList" highlight-current-row v-loading="state.loading" border style="width: 100%;height:73%"
        :cell-style="tableStyle.cellStyle" stripe :header-cell-style="tableStyle.headerCellStyle">
        <el-table-column prop="salesOrders" :label="$t('dailyDeliveryData.salesOrderCode')" />
        <el-table-column prop="dnCode" :label="$t('dailyDeliveryData.dnCode')" />
        <el-table-column prop="materialCode" :label="$t('dailyDeliveryData.materialCode')" width="120"/>
        <el-table-column prop="sumQty" :label="$t('dailyDeliveryData.deliverQty')" width="100">
            <template #default="scope">
                <!--根据不同的状态选择不同的颜色的tag-->
                <el-tag size="large" type="success">
                    {{ scope.row.sumQty }}
                </el-tag>
            </template>
        </el-table-column>
    </el-table>
    <pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" style="margin-top: 7px !important;"/>
</template>

<script setup lang="ts">
import { ref, reactive, onMounted } from 'vue';
import { BasicTableProps, useTable } from "/@/hooks/table";
import { useMessage, useMessageBox } from "/@/hooks/message";
import { getShippedTodayList } from "/@/api/platform/report/dailyDeliveryData"
import { useI18n } from 'vue-i18n';
const { t } = useI18n();

const state: BasicTableProps = reactive<BasicTableProps>({
    queryForm: {},
    pageList: getShippedTodayList
})

const {
    getDataList,
    currentChangeHandle,
    sizeChangeHandle,
    sortChangeHandle,
    downBlobFile,
    tableStyle
} = useTable(state)

</script>
